package com.coder.oj.admin.dto;

import com.coder.oj.common.validate.ValidationGroups;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class UserDto implements Serializable {


    @ApiModelProperty("主键id")
    @NotNull(message = "主键id不能为空", groups = {ValidationGroups.Update.class})
    private Long id;

    @ApiModelProperty(value = "用户名称")
    @NotBlank(message = "用户名称不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String nickname;

    @ApiModelProperty("用户头像")
    @NotBlank(message = "用户头像不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String avatar;

    @ApiModelProperty("openId")
    @NotBlank(message = "openId不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String openId;
}
